<?php
ob_start();
require('includes/top.php');

$category = $_POST['category'];
$subcategory = $_POST['subcategory'];
/*if(isset($_POST["newstype"]) && !empty($_POST["newstype"])){	
	$newstype=array_values($_POST["newstype"]);
	//$news_id=array_values($_POST["news_id"]);
	$count=sizeof($newstype);										  
	for($i=0;$i<=$count;$i++){					  						  					  
		if(trim($newstype[$i])!=''){
			$News_Type=addslashes(trim($newstype[$i]));	
			//$NewsId=addslashes(trim($news_id[$i]));	
				//start news id
				if(isset($_POST["news_id"]) && !empty($_POST["news_id"])){					
				$news_id=array_values($_POST["news_id"]);
				$count2=sizeof($news_id);										  
				for($j=0;$j<=$count2;$j++){					  						  					  
					if(trim($news_id[$j])!=''){						
						$NewsId=addslashes(trim($news_id[$j]));
						//echo 'News Type'.$News_Type;
						//echo 'News ID'.$NewsId;
						$query=mysql_query("select * from associate where newtype_id=".$News_Type." and news_id=".$NewsId);
						if(mysql_num_rows($query)==0)
						{
							$sql="INSERT INTO associate(`newtype_id`,`news_id`) VALUES ('$News_Type','$NewsId')";
							$result=mysql_query($sql);						
						}
					}										
				}
			}	 			
			//end news id
		}										
	}
}	*/ 

header("location:associate.php");
ob_flush();
?>
 